package com.xxl.sso.core.conf;

import com.xxl.sso.core.entity.ReturnT;

/**
 * conf
 *
 * @author xuxueli 2018-04-02 19:18:04
 */
public class Conf {

    /**
     * sso sessionid, between browser and sso-server (web + token client)
     */
    public static final String SSO_SESSIONID = "xxl_sso_sessionid";

    public static final String SSO_CAPTCHACODE = "xxl_sso_captcha_code";
    /**
     * redirect url (web client)
     */
    public static final String REDIRECT_URL = "redirect_url";

    public static final String TO_URL = "to_url";

    /**
     * sso user, request attribute (web client)
     */
    public static final String SSO_USER = "xxl_sso_user";


    /**
     * sso server address (web + token client)
     */
    public static final String SSO_SERVER = "sso_server";

    /**
     * login url, server relative path (web client)
     */
    public static final String SSO_LOGIN = "/login";
    public static final String VALIDATE_LOGIN_PATH = "/validateLogin";
    /**
     * logout url, server relative path (web client)
     */
    public static final String SSO_LOGOUT = "/logout";


    /**
     * logout path, client relatice path
     */
    public static final String SSO_LOGOUT_PATH = "SSO_LOGOUT_PATH";

    /**
     * excluded paths, client relatice path, include path can be set by "filter-mapping"
     */
    public static final String SSO_EXCLUDED_PATHS = "SSO_EXCLUDED_PATHS";


    /**
     * login fail result
     */
    public static final ReturnT<String> SSO_LOGIN_FAIL_RESULT = new ReturnT(501, "sso not login.");
    /**
     *
     */
    public static final ReturnT<String> SSO_LOGIN_OUT_RESULT = new ReturnT(502, "sso login out.");


    /**
     * 获取缓存信息restful接口相对路径
     */
    public static String getCachePostUrl = "/usercenter/sysCache/cacheValAqusitionByCacheKey";

    /**
     * 删除缓存信息restful接口相对路径
     */
    public static String removeCachePostUrl = "/usercenter/sysCache/cacheEvictionByCacheKey";

    /**
     * 修改缓存信息restful接口相对路径
     */
    public static String addOrUpdateCachePostUrl = "/usercenter/sysCache/cacheRefreshing";

}
